package cz.muni.fi.pa165.pokemon.service;

import cz.muni.fi.pa165.pokemon.dto.TrainerTO;
import java.util.List;


/**
  * Service layer interface for Trainer CRUD and find functionality 
  * using transfer object.
  * 
  * @author Michal Toth
  */
public interface TrainerService {

        /*
        * Creates trainer service from trainer transfer object.
        *
        * @param trainer Trainer transfer object to create
        */
        void create(TrainerTO trainer);

        /**
         * Returns trainer tranfer object using trainer id.
         *
         * @param id Id of the trainer service
         * @return Trainer transfer object with given id
         */
        TrainerTO get(Long id);

        /**
         * Updates trainer service information from transfer object.
         *
         * @param trainer Trainer transfer object to be updated
         */
        void update(TrainerTO trainer);

        /**
         * Removes given trainer transfer object from database.
         *
         * @param trainer Trainer transfer object to be removed
         */
        void remove(TrainerTO trainer);

        /**
         * Method returns list of all trainer transfer objects.
         *
         * @return List of all trainer transfer objects.
         */
        List<TrainerTO> findAll();

        /**
         * Finds all trainer transfer objects with same name.
         *
         * @param name Name of trainer
         * @return List of trainer transfer objects with same name
         */
        List<TrainerTO> findByName(String name);
}
